import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: () => import('../views/IndexView.vue')
    },
    {
      path: '/login',
      name: 'login',
      component: () => import('../views/LoginView.vue')
    },
    {
      path: '/regist',
      name: 'Regist',
      component: () => import('../views/RegistView.vue')
    },
    {
      path: '/manage',
      name: 'manage',
      component: () => import('../views/manage/IndexView.vue'),
      children: [
        {
          path: '/userManage',
          name: 'userManage',
          component: () => import('../views/manage/user/UserManageView.vue')
        },
        {
          path: '/videoManage',
          name: 'videoManage',
          component: () => import('../views/manage/video/VideoManageView.vue')
        },
        {
          path: '/examManage',
          name: 'examManage',
          component: () => import('../views/manage/exam/ExamManageView.vue')
        },
        {
          path: '/CaseManage',
          name: 'CaseManage',
          component: () => import('../views/manage/case/CaseManageView.vue')
        },
        {
          path: '/honorManage',
          name: 'HonorManage',
          component: () => import('../views/manage/honor/HonorManageView.vue')
        },
        {
          path: '/suggestManage',
          name: 'suggestManage',
          component: () => import('../views/manage/suggest/SuggestView.vue')
        },
        {
          path: '/questionManage',
          name: 'questionManage',
          component: () => import('../views/manage/question/QuestionManageView.vue')
        },
        {
          path: '/addUser',
          name: 'addUser',
          component: () => import('../views/manage/user/AddUserView.vue'),
        },
        {
          path: '/addVideo',
          name: 'addVideo',
          component: () => import('../views/manage/video/AddVideoView.vue'),
        },
        {
          path: '/addHonor',
          name: 'addHonor',
          component: () => import('../views/manage/honor/AddHonorView.vue'),
        },
        {
          path: '/addQuestion',
          name: 'addQuestin',
          component: () => import('../views/manage/question/AddQuestionView.vue'),
        },
      ]
    }


  ]
})

export default router
